package com.dongdongkeji.base.widget.dialog;

import android.app.Dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.Gravity;
import android.view.ViewGroup;

import com.dongdongkeji.base.R;

/**
 * Author: ChenJing
 * Date: 2017-06-19 下午 4:31
 * Version: 1.0
 */

public class ProgressDialog extends Dialog{

    public ProgressDialog(@NonNull Context context) {
        super(context, R.style.CustomDialog);

        setContentView(R.layout.dialog_progress);
        setCanceledOnTouchOutside(false);
    }

    @Override
    protected void onStart() {
        super.onStart();
        getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
        getWindow().setGravity(Gravity.CENTER);
    }
}
